import http from '@/utils/request'

// 获取我的所有订单
export function getMyAllOrder(params) {
	return http.post("/user/order/all",params)
}

export function getMyOrderByState(params) {
	return http.post('/user/order/bystate',params)
}

// 获取待付款订单
export function getWaitPayOrder(param) {
	return http.post('/user/order/waitpay',param)
}

// 获取进行中订单
export function getRunningOrder(param) {
	return http.post('/user/order/running',param)
}

// 获取已完成订单
export function getCompleteOrder(param) {
	return http.post('/user/order/complete',param)
}

// 退款订单
export function getRefundOrder(param) {
	return http.post('/user/order/refund',param)
}

// 取消订单
export function cancelOrder(id) {
	return http.get("/user/order/cancel/"+ id)
}

// 删除订单
export function deleteOrder(id) {
	return http.get("/user/order/delete/"+ id)
}

